package com.xiao.demo;

import com.xiao.annotation.*;
import com.xiao.demo.service.impl.TestServiceImpl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@MyController
@MyRequestMapping("/test")
public class HelloController {
    @MyAutowired
    TestServiceImpl testService;

    @MyRequestMapping("/hello")
    public void test1(HttpServletRequest request, HttpServletResponse response,
                      @MyRequestParam("param") String param){
        System.out.println( testService.query("xiaoping","30"));

        try {
            response.getWriter().write(  " param:"+param);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
